Skip to content

[#1988] Added JSDoc for ESLint.#1990

Closed
AlexSkrypnyk wants to merge 1 commit into
developfrom
feature/eslint-jsdoc
Closed

[#1988] Added JSDoc for ESLint.#1990
AlexSkrypnyk wants to merge 1 commit into
developfrom
feature/eslint-jsdoc

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Sep 5, 2025

Copy link
Copy Markdown
Member

Closes #1988

Summary by CodeRabbit

  • Chores
    • Added a JSDoc formatting plugin to development tooling to improve documentation consistency.
    • No user-facing changes.

@coderabbitai

coderabbitai Bot commented Sep 5, 2025

Copy link
Copy Markdown

Walkthrough

Adds a new devDependency, prettier-plugin-jsdoc@^1.3.3, to package.json. No other files or configuration fields were changed.

Changes

Cohort / File(s) Summary
Tooling: Prettier plugin
package.json
Added devDependency "prettier-plugin-jsdoc": "^1.3.3".

Sequence Diagram(s)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Assessment against linked issues

Objective Addressed Explanation
Update ESLint config for modules from ES5 to ES6 (#1988) Only adds a Prettier JSDoc plugin; no ESLint config or ES version changes.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Add Prettier JSDoc plugin devDependency (package.json › devDependencies) Not related to updating ESLint to ES6; no ESLint rules, parser options, or configs modified.

Possibly related PRs

Poem

In the repo’s burrow, neat and snug,
I nibbled docs and fluffed each tag’s hug.
A JSDoc tune, Prettier’s delight,
Carrots aligned, comments just right.
Hop, hop—formatting’s not a slog,
When plugins dance in the changelog. 🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/eslint-jsdoc

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot temporarily deployed to commit September 5, 2025 02:57 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
package.json (1)

18-30: Enable eslint-plugin-jsdoc and extend lint-js file extensions

  • In /.eslintrc.json and /.vortex/docs/.eslintrc.js, add "plugin:jsdoc/recommended" to the extends array and include "jsdoc" in plugins.
  • In package.json’s scripts.lint-js, change --ext .js to --ext .js,.jsx,.mjs (or to match all JS module filetypes used).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6fa789c and c3ffbde.

⛔ Files ignored due to path filters (2)
  • .vortex/installer/tests/Fixtures/install/_baseline/package.json is excluded by !.vortex/installer/tests/Fixtures/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-docs

Comment thread package.json
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-yml": "^1.16.0",
"prettier": "^3.6.2",
"prettier-plugin-jsdoc": "^1.3.3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

🛠️ Refactor suggestion

⚠️ Potential issue

This change doesn’t meet the PR/issue objective (ESLint ES6 + JSDoc rules).

You added Prettier’s JSDoc formatting plugin, but:

  • The linked issue asks to switch ESLint config from ES5 to ES6.
  • The PR title mentions “JSDoc for ESLint,” which typically implies eslint-plugin-jsdoc, not prettier-plugin-jsdoc.

Action:

  • Update ESLint config to ES6 (e.g., env: { es2021: true }, parserOptions: { ecmaVersion: "latest", sourceType: "module" }).
  • Add and configure eslint-plugin-jsdoc for linting JSDoc.
  • Keep prettier-plugin-jsdoc only if you want Prettier to auto-format JSDoc.

I can draft the ESLint config and rule set for ES6 + JSDoc if you prefer.


🧹 Nitpick (assertive)

Wire up the Prettier plugin; otherwise it likely has no effect.

With Prettier v3, plugins typically need explicit configuration. Ensure .prettierrc* or package.json "prettier" lists the plugin.

Suggested addition (only if you’re not using a separate .prettierrc):

 {
   "name": "your_site",
   ...
   "private": true,
+  "prettier": {
+    "plugins": ["prettier-plugin-jsdoc"]
+  },
   "engines": {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"prettier-plugin-jsdoc": "^1.3.3",
{
"name": "your_site",
...
"private": true,
"prettier": {
"plugins": ["prettier-plugin-jsdoc"]
},
"engines": {
🤖 Prompt for AI Agents
In package.json around line 26, the prettier-plugin-jsdoc entry is present but
not wired into Prettier; add a "prettier" key in package.json (or update your
existing .prettierrc* file) to include "plugins": ["prettier-plugin-jsdoc"] so
Prettier v3 loads the plugin. If you already use a .prettierrc(.json/.js/.cjs)
instead of package.json, add the same plugins array there; after updating, run
your formatter to verify the plugin is applied.

@codecov

codecov Bot commented Sep 5, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.68%. Comparing base (6fa789c) to head (c3ffbde).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1990   +/-   ##
========================================
  Coverage    77.68%   77.68%           
========================================
  Files           90       90           
  Lines         5549     5549           
  Branches        44       44           
========================================
  Hits          4311     4311           
  Misses        1238     1238           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Sep 5, 2025
@AlexSkrypnyk AlexSkrypnyk deleted the feature/eslint-jsdoc branch September 5, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[DRUPAL] Eslint for modules uses ES5 instead of ES6 config

1 participant